package de.gwtprime.client.event;

import com.google.gwt.event.shared.GwtEvent;

import de.gwtprime.client.event.handler.CommentPostedEventHandler;
import de.gwtprime.shared.requestFactory.ArticleCommentProxy;

public class CommentPostedEvent extends GwtEvent<CommentPostedEventHandler> {

	

	public static Type<CommentPostedEventHandler> TYPE = new Type<CommentPostedEventHandler>();
	
	private ArticleCommentProxy articleComment;
	public CommentPostedEvent(ArticleCommentProxy articleComment){
		this.setArticleComment(articleComment);
	}
	
	@Override
	public Type<CommentPostedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(CommentPostedEventHandler handler) {
		handler.onCommentPosted(this);
		
	}

	public ArticleCommentProxy getArticleComment() {
		return articleComment;
	}

	public void setArticleComment(ArticleCommentProxy articleComment) {
		this.articleComment = articleComment;
	}

}
